//
//  SKYGlobalMacros.h
//  SkyonSDK
//
//  Created by macbook on 2018/5/6.
//  Copyright © 2018年 Skyon. All rights reserved.
//

#import <Foundation/Foundation.h>

#pragma mark - Extern and Inline  functions 内联函数  外联函数
/*／EXTERN 外联函数*/
#if !defined(FK_EXTERN)
#  if defined(__cplusplus)
#   define FK_EXTERN extern "C"
#  else
#   define FK_EXTERN extern
#  endif
#endif

/*INLINE 内联函数*/
#if !defined(FK_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#  define FK_INLINE static inline
# elif defined(__cplusplus)
#  define FK_INLINE static inline
# elif defined(__GNUC__)
#  define FK_INLINE static __inline__
# else
#  define FK_INLINE static
# endif
#endif

// 字符串是否为空
#define SKY_IsStrEmpty(_ref)    (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref)isEqualToString:@""]))



//对指定类进行单例化
#undef    SKY_AS_SINGLETON
#define SKY_AS_SINGLETON( __class ) \
+ (__class *)sharedInstance;

#undef    SKY_DEF_SINGLETON
#define SKY_DEF_SINGLETON( __class ) \
+ (__class *)sharedInstance \
{ \
static dispatch_once_t once; \
static __class * __singleton__; \
dispatch_once(&once, ^{ __singleton__ = [[__class alloc] init]; } ); \
return __singleton__; \
}


#import "SKYGlobalFunction.h"
